<%-- 
    Document   : doctors
    Created on : May 18, 2011, 9:03:16 PM
    Author     : suraj
--%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<br/>
<br/>
<table id="cas-list-table"> 
    <caption>Patients</caption> 
    <thead> 
        <tr> 
            <th style="width: 3%">#</th> 
            <th style="width: 7%">ID</th> 
            <th>Name</th> 
            <th style="width: 20%">Date of Birth</th> 
            <th style="width: 20%">Oman ID Card No.</th> 
            <th colspan="3" style="width: 30%">
                Actions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <html:link style="font-size: 12px;" action="/patientsAction.do?entityType=patient&entityAction=add">
                Add New
                </html:link>
            </th> 
        </tr> 
    </thead> 
    
    <tbody> 
        <logic:iterate id="patient" name="listPatients" indexId="count">  
            <tr class="<%=count % 2 == 0 ? "odd" : ""%>">  
                <td><%=count + 1%></td>
                <td>
                    <html:link action="/patientsAction.do?entityType=patient&entityAction=view&entityId=${patient.id}">
                    <bean:write name="patient" property="id"/>
                    </html:link>
                </td>  
                <td>
                    <html:link action="/patientsAction.do?entityType=patient&entityAction=view&entityId=${patient.id}">                    
                    <bean:write name="patient" property="firstName"/>&nbsp;
                    <bean:write name="patient" property="secondName"/>&nbsp;
                    <bean:write name="patient" property="familyName"/>
                    </html:link>
                </td>  
              
                <td><bean:write name="patient" property="dateOfBirth"/></td>  
                <td><bean:write name="patient" property="omanIdCardNumber"/></td> 
              
                <td><html:link action="/patientsAction.do?entityType=patient&entityAction=view&entityId=${patient.id}">View</html:link></td>  
                <td><html:link action="/patientsAction.do?entityType=patient&entityAction=edit&entityId=${patient.id}">Edit</html:link></td>  
                <td><html:link action="/patientsAction.do?entityType=patient&entityAction=delete&entityId=${patient.id}">Delete</html:link></td>
          
            </tr>  
        </logic:iterate>  
    </tbody>
</table>
<br/>
<br/>
